package com.fx.usercenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fx.usercenter.model.domain.User;

import javax.servlet.http.HttpServletRequest;

/**
* @author Administrator
* @description 针对表【user】的数据库操作Service
* @createDate 2024-04-10 15:18:50
*/


/*
   用户服务
 */
public interface  UserService extends IService<User> {
    /**
     * 用户注册
     * @param userAccount  用户账号
     * @param userPassword 用户密码
     * @param checkPassword
     * @param planetCode 星球编号
      * @return 用户id
     */


 long UserRegister(String userAccount,String userPassword,String checkPassword,String planetCode);

    /**
     * 用户登录
     *
     * @param userAccount  用户账号
     * @param userPassword 用户密码
     * @param request
     * @return 脱敏后的用户信息
     */
    User UserLogin(String userAccount, String userPassword, HttpServletRequest request );

    //登录 userLogin
    User userLogin(String userAccount, String userPassword, HttpServletRequest request);

    User getSafetyUser(User originUser);
    User getCurrentUser(HttpServletRequest request);

    /**
     * 用户注销
     * @param request
     * @return
     */
    int userLogout(HttpServletRequest request);
}
